package montecarlo;

import java.awt.BorderLayout;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;

import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

public class MonteCarloView extends JFrame {
MonteCarlo model; 	
public JCheckBox thread=new JCheckBox();
public JCheckBox multiT=new JCheckBox();	
private JLabel monothread;
private JLabel multithread;

private JLabel leRes;
public JLabel res=new JLabel("");

public MonteCarloView(MonteCarlo model){
		this.model = model;

        GridBagConstraints firstCol = new GridBagConstraints();
        firstCol.weightx = 1.0;
        firstCol.anchor = GridBagConstraints.WEST;
        firstCol.insets = new Insets(5, 20, 5, 5);

        GridBagConstraints lastCol = new GridBagConstraints();
        lastCol.gridwidth = GridBagConstraints.REMAINDER;
        lastCol.weightx = 1.0;
        lastCol.fill = GridBagConstraints.HORIZONTAL;
        lastCol.insets = new Insets(5, 5, 5, 20);
        
		
		JPanel contentPane=new JPanel(new GridBagLayout());
		JLabel monothread=new JLabel("monothread");
		JLabel multithread=new JLabel("multithread");
		JLabel leRes=new JLabel("resultat");
		contentPane.add(monothread);
		contentPane.add(multithread);
		contentPane.add(leRes);
		contentPane.add(res);
		
		contentPane.add(monothread,firstCol);
		contentPane.add(thread,lastCol);
		contentPane.add(multithread,firstCol);
		contentPane.add(multiT,lastCol);
		contentPane.add(leRes,firstCol);
		contentPane.add(res,lastCol);
		
        this.add(contentPane);
		this.setContentPane(contentPane);
		this.setVisible(true);						// make it visible - always last!
		
	}

}
